<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>${title}</title>
<script type="text/javascript" src="${base}/js/jquery-2.1.3.min.js"></script>
<link rel="stylesheet" href="${base}/css/default.css" type="text/css">
<style>
.dish-input {
    width: 22rem;
    margin: .5rem auto;
    display: block;
    height: 1.8rem;
    border-radius: .1rem;
    line-height: 1.8rem;
    font-size: .8rem;
    text-indent: .1rem;
    border-width: 0px;
    background-color: #fff;
    background-size: 5%;
}

.dish-txt{
	font-size: .6rem;
	margin:1rem;
	color:#ff8800;
}

.dis-head-button{
		font-weight:normal;
	    border:none;
	    color:#fff;
	    background-color:#FF5000;
	    font-size:1rem;
	    position:absolute;
	    right:1rem;
	    top:1rem;
	    font-family: arial, "Microsoft Yahei", sans-serif;
	}
</style>
</head>
<body>
<header>
	<a href="javascript:history.go(-1)" class="back"><span>返回</span></a>
	<h2>修改个人信息</h2>
	<button class="dis-head-button" id='dis-button' type='button'>保存</button>
	</header>
<nav>
  <ul>
    <li class="n1"><a href="${base}/index/index"><cite></cite><span>首页</span></a></li>
    <li class="n2"><a href="${base}/search/index"><cite></cite><span>搜索</span></a></li>
    <li class="n3"><a href="${base}/subscribe/index"><cite></cite><span>订阅</span></a></li>
    <li class="n4"><a href="${base}/center/index" class="on"><cite></cite><span>我的</span></a></li>
  </ul>
</nav>
<div>
	<input type="text" id="keywords" class="dish-input"/>
	<span class="dish-txt">${typeText}</span>
	<input type="hidden" id="type" value='${type}'>
</div>
</body>
<script type="text/javascript" src="${base}/js/public/lib/zepto.min.js"></script>
<script type="text/javascript">
    (function(w){
    	
	    $('#dis-button').on('click',function(){
	    var key = $('#keywords').val();
    	var type = $('#type').val();
	    		$.ajax({
	    			url:'${base}/center/userSave',
	    			type:'post',
	    			data:{key:key,type:type},
	    			dataType:'json',
	    			success:function(data){
	    				alert(data.msg)
	    				if(data.type=='1'){
	    					window.location.href="${base}/center/userinfo";
	    				}
	    			}
	    		});
	    });
    }(window));
    </script>
</html>
